<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<title>联系人列表</title> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="css/Style.css" type=text/css rel=stylesheet>
<link href="css/Manage.css" type=text/css
	rel=stylesheet>
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>

<meta content="MSHTML 6.00.2900.3492" name=GENERATOR>
</head>
<body>
	<form id="customerForm" name="customerForm"
		action="linkman"
		method="get">
		<input type="hidden" name="flag" value="query">
		<table cellSpacing=0 cellPadding=0 width="98%" border=0>
			<tbody>
				<tr>
					<td width=15><img src="images/new_019.jpg"
						border=0></td>
					<td width="100%" background="images/new_020.jpg"
						height=20></td>
					<td width=15><img src="images/new_021.jpg"
						border=0></td>
				</tr>
			</tbody>
		</table>
		<table cellSpacing=0 cellPadding=0 width="98%" border=0>
			<tbody>
				<tr>
					<td width=15 background="images/new_022.jpg"><img
						src="images/new_022.jpg" border=0></td>
					<td vAlign=top width="100%" bgColor=#ffffff>
						<table cellSpacing=0 cellPadding=5 width="100%" border=0>
							<tr>
								<td class=manageHead>当前位置：联系人管理 &gt; 联系人列表</TD>
							</tr>
							<tr>
								<td height=2></td>
							</tr>
						</table>
						<table borderColor=#cccccc cellSpacing=0 cellPadding=0
							width="100%" align=center border=0>
							<tbody>
								<tr>
									<td height=25>
										<table cellSpacing=0 cellPadding=2 border=0>
											<tbody>
												<tr>
													<td>联系人名称：</td>
													<td><input class=textbox id=sChannel2
														style="WIDTH: 80px" maxLength=50 name="lkmName" value="${lkmName }"></td>
													
													<td><input class=button id=sButton2 type=submit
														value=" 筛选 " name=sButton2></td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							    
								<tr>
									<td>
										<table id=grid
											style="BORDER-TOP-WIDTH: 0px; FONT-WEIGHT: normal; BORDER-LEFT-WIDTH: 0px; BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #cccccc; WIDTH: 100%; BORDER-TOP-COLOR: #cccccc; FONT-STYLE: normal; BACKGROUND-COLOR: #cccccc; BORDER-RIGHT-WIDTH: 0px; TEXT-DECORATION: none; BORDER-RIGHT-COLOR: #cccccc"
											cellSpacing=1 cellPadding=2 rules=all border=0>
											<tbody>
												<tr
													style="FONT-WEIGHT: bold; FONT-STYLE: normal; BACKGROUND-COLOR: #eeeeee; TEXT-DECORATION: none">
													<td>联系人名称</td>
													<td>联系人性别</td>
													<td>所属客户</td>
													<td>联系人办公电话</td>
													<td>联系人手机</td>
													<td>联系人邮箱</td>
													<td>联系人QQ</td>
													<td>联系人职位</td>
													<td>联系人备注</td>
													
													<td>操作</td>
												</tr>
												<c:forEach items="${pageLinkman.result }" var="linkman">
												<tr
													style="FONT-WEIGHT: normal; FONT-STYLE: normal; BACKGROUND-COLOR: white; TEXT-DECORATION: none">
													<td>${linkman.lkm_name }</td>
													<td>${linkman.lkm_gender }</td>
													<td>${linkman.cust_name }</td>
													<td>${linkman.lkm_phone }</td>
													<td>${linkman.lkm_mobile }</td>
													<td>${linkman.lkm_email }</td>
													<td>${linkman.lkm_qq }</td>
													<td>${linkman.lkm_position }</td>
													<td>${linkman.lkm_memo }</td>
													
													<td>
													<a href="linkman?flag=goedit&lkmId=${linkman.lkm_id }">修改</a>
													&nbsp;&nbsp;
													<a href="linkman?flag=del&lkmId=${linkman.lkm_id }">删除</a>
													</TD>
												</TR>
												</c:forEach>
											</tbody>
										</table>
									</td>
								</tr>
								
								<tr>
									<td><span id=pagelink>
											<div
												style="LINE-HEIGHT: 20px; HEIGHT: 20px; TEXT-ALIGN: right">
												共[<B>${pageLinkman.totalCount }</B>]条记录,[<B id="pages">${pageLinkman.pages }</B>]页
												,每页显示
												<input type="hidden" id="pageSizes" value="${pageLinkman.pageSize }">
												<select name="pageSize" id="pageSize">
													<option value="15" >15</option>
													<option value="30" >30</option>
												</select>
												条
												[<A href="javascript:void(0)" id="jian">前一页</A>]
												<input type="hidden" name="pageNumber" id="pageNumber" value = "${pageLinkman.pageNumber }">
												<B id="pageNumbers">${pageCustomer.pageNumber }</B>
												[<A href="javascript:void(0)" id="jia">后一页</A>] 
												到
												<input type="text" size="3" id="page" name="page" value="1"/>
												页
												<input type="button" value="Go" id="go"/>
											</div>
									</span></td>
								</tr>
							</tbody>
						</table>
					</td>
					<td width=15 background="images/new_023.jpg"><IMG
						src="images/new_023.jpg" border=0></td>
				</tr>
			</tbody>
		</table>
		<table cellSpacing=0 cellPadding=0 width="98%" border=0>
			<tbody>
				<tr>
					<td width=15><img src="images/new_024.jpg"
						border=0></td>
					<td align=middle width="100%"
						background="images/new_025.jpg" height=15></td>
					<td width=15><img src="images/new_026.jpg"
						border=0></td>
				</tr>
			</tbody>
		</table>
	</form>
</body>
<SCRIPT language=javascript>
var pageSize = $("#pageSizes").val();
$("#pageSize").val(pageSize);

$("#jian").click(function(){
	var pageNumber = $("#pageNumber").val();
	if(pageNumber!=1){
		pageNumber=parseInt(pageNumber)-1;
        $("#pageNumber").val(pageNumber); 
        document.forms.customerForm.submit(); 
	}else{
		alert("已经是第一页了！");	
	}
})
$("#jia").click(function(){
	var pageNumber = $("#pageNumber").val();
	var n = $("#pages").html();
	if(pageNumber!=n){
		pageNumber=parseInt(pageNumber)+1;
        $("#pageNumber").val(pageNumber); 
        document.forms.customerForm.submit(); 
	}else{
		alert("已经是最后一页了！");	
	}
})
$("#go").click(function(){
	var page = $("#page").val();
	var pages = $("#pages").html();
	if(page>=1 && page<=pages){
		$("#pageNumber").val(page); 
        document.forms.customerForm.submit();
	}else{
		alert("没有第"+page+"页！");	
	}
})
</SCRIPT>
</html>
